/**  
 * @project_name yjd_comm
 * @Title: ICashout.java
 * @Package com.yjd.comm.cashout.service
 * @Description: TODO
 * @author lindy lindytem@126.com  
 * @date 2014-8-26 下午3:28:23
 * @version V1.0  
 * <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
 */
package com.yjd.comm.funds.service;

import java.util.Map;

import com.yjd.comm.base.model.PagerModel;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.funds.dto.FundsTotalDto;
import com.yjd.comm.funds.model.FundsModel;
import com.yjd.comm.user.model.UserCountModel;

/**
 * @ClassName: ICashout
 * @Description: 金额操作接口
 * @author lindy lindytem@126.com
 * @date 2014-8-26 下午3:28:23
 */
public interface IFundsService extends IBaseService {

	FundsModel getFunds(Long user_id, boolean b);

	/**
	 * 
	 * 获取用户统计
	 * 
	 * @param paramMap
	 * @param b
	 * @return
	 */
	public UserCountModel getCountModel(Map<String, Object> paramMap, boolean b);

	/**
	 * 资金总览
	 * 
	 * @param idUser
	 * @return FundsTotalDto
	 * @throws Exception
	 */
	public FundsTotalDto getFundsTotal(Long idUser) throws Exception;

	/**
	* 更新用户的资金信息
	* @param user_id
	* @param paramMap
	* @return
	* @throws Exception
	 */
	@SuppressWarnings("rawtypes")
	public int updateUserFunds(Long user_id,Map paramMap) throws Exception;

	/**
	 * 
	* 获取资金总数
	* @param paramMap
	* @param b
	* @return
	 */
	public double getFundsSum(Map<String, Object> paramMap, String field) throws Exception;
	
	/**
	* 对用户资金表中某些字段进行添加或者减去操作
	* @param user_id 用户id，必填
	* @param fundsModel 资金对象
	* @param curtime 当前时间
	* @return
	 */
	public int incrFundsByUserId(Long user_id,FundsModel fundsModel,Long curtime) throws Exception;
	
	/**
	 * 我的奖励
	* @param paramMap
	* @return PagerModel
	 * @throws Exception 
	 */
	public PagerModel getMyRewardPagerModel(Map<String, Object> paramMap) throws Exception;
	
}
